<?php

namespace Modules\Ui\Providers;

use Arco\ArcoServiceProvider;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Modules\Ui\component\SectionManager;
use Modules\Ui\Components\AppTest;

class UiProviders extends ServiceProvider
{

    public function register()
    {
//        // 注册中间件
//        $this->app['router']->aliasMiddleware('wechat.oauth', '类名');
//
//        // 分组中间件追加
//        $this->app['kernel']->appendMiddlewareToGroup('web', '类名');

    }

    public function boot()
    {
        $this->app->register(ArcoServiceProvider::class);
        $this->app->singleton('UI.sections', SectionManager::class);
        Blade::componentNamespace('Modules\\Ui\\component\\Layout\\Components', 'comp');
        $this->registerViews();
    }

    protected function registerViews()
    {
        $this->loadViewsFrom(__DIR__.'/../View', 'UI');
    }
}
